package org.zh.sh.vll;

import org.zh.sh.util.http.Controller;
import org.zh.sh.util.http.HttpMethod;
import org.zh.sh.util.http.RequestMapping;

import java.util.Map;

import static org.zh.sh.config.GlobalStatic.proxyAppUserSV;
import static org.zh.sh.util.http.HttpStatic.APPLICATION_FORM_URLENCODED_VALUE;
import static org.zh.sh.util.http.HttpStatic.MULTIPART_FORM_DATA_VALUE;

@Controller
public class AppUserVLL {

    @RequestMapping(value = "/appUser/registry",method = HttpMethod.GET,consumes = APPLICATION_FORM_URLENCODED_VALUE)
    public Map<String, Object> registry(Map<String, Object> appUser) {
        return proxyAppUserSV.insert(appUser);
    }
    @RequestMapping(value = "/appUser/insert",consumes = APPLICATION_FORM_URLENCODED_VALUE)
    public Map<String, Object> insert(Map<String, Object> appUser) {
        return proxyAppUserSV.insert(appUser);
    }

    @RequestMapping(value = "/appUser/insertVoid")
    public void insertVoid(Map<String, Object> appUser) {
        proxyAppUserSV.insert(appUser);
    }

    @RequestMapping(value = "/appUser/updateById",consumes = APPLICATION_FORM_URLENCODED_VALUE)
    public int updateById(Map<String, Object> appUser) {
        return proxyAppUserSV.updateById(appUser);
    }

    @RequestMapping(value = "/appUser/queryById")
    public Map<String, Object> queryById(Long id) {
        return proxyAppUserSV.queryById(id);
    }

    @RequestMapping(value = "/appUser/deleteById")
    public int deleteById(Long id) {
        return proxyAppUserSV.deleteById(id);
    }

    @RequestMapping(value = "/appUser/upload",consumes = MULTIPART_FORM_DATA_VALUE)
    public Map<String,Object> upload(Map<String,Object> appUser){
        return appUser;
    }
}
